package cn.buk.api.ctrip.service;

import cn.buk.api.ctrip.dto.share.*;

import java.util.List;

/**
 * Created by yfdai on 16/1/5.
 */
public interface IntlLowPriceService {

    int PRIVATE_OW_POLICY_CREATE = 1; // 私有单程运价新增
    int PRIVATE_OW_POLICY_DELETE = 2; // 私有单程运价删除
    int PRIVATE_OW_POLICY_UPDATE = 5; // 私有单程运价修改
    int PRIVATE_OW_POLICY_READ = 6; // 私有单程运价查询
    int PRIVATE_OW_POLICY_PRICE_UPDATE = 14; // 私有单程运价调价
    int PRIVATE_OW_POLICY_PRICE_BATCH_UPDATE = 24; // 私有单程运价批量调价

    int PRIVATE_RT_POLICY_CREATE = 3; // 私有往返运价新增
    int PRIVATE_RT_POLICY_DELETE = 4; // 私有往返运价删除
    int PRIVATE_RT_POLICY_UPDATE = 7; // 私有往返运价修改
    int PRIVATE_RT_POLICY_READ = 8;   // 私有往返运价查询
    int PRIVATE_RT_POLICY_PRICE_UPDATE = 15; // 私有往返运价调价
    int PRIVATE_RT_POLICY_PRICE_BATCH_UPDATE = 25; // 私有往返运价批量调价

    int PUBLIC_POLICY_CREATE = 9; // 公布运价新增
    int PUBLIC_POLICY_DELETE = 10; // 公布运价删除
    int PUBLIC_POLICY_UPDATE = 11; // 公布运价修改
    int PUBLIC_POLICY_READ = 12;   // 公布运价查询
    int PUBLIC_POLICY_PRICE_UPDATE = 13;   // 公布运价调价
    int PRIVATE_PUBLIC_POLICY_PRICE_UPDATE = 26;   // 私有公布运价批量调价

    /**
     * 搜索低价
     * 接口限制（每分钟160条航线）
     * @return
     */
    ArrayOfIntlLowPriceResponse searchLowPrice(String userId, String password, IntlLowPriceRequest request);

    /**
     * 查询国际私有单程运价
     * @param username
     * @param password
     * @param owFareInfo
     * @return
     */
    OwFareResponse searchIntlOwFareInfo(String username, String password, IntlOwFareInfo owFareInfo);

    /**
     * 根据fareId查询
     * @param username
     * @param password
     * @param fareId
     * @return
     */
    IntlOwFareInfo searchOwFareByFareId(String username, String password, long fareId);

    /**
     * 调整单程政策的留钱
     * @param username
     * @param password
     * @param fareId
     * @param profit
     * @return
     */
    OpenApiResponse adjustOwFareProfit(String username, String password, long fareId, int profit);

    /**
     * 查询国际私有往返运价
     * @param username
     * @param password
     * @param rtFareInfo
     * @return
     */
    RtFareResponse searchIntlRtFareInfo(String username, String password, IntlRtFareInfo rtFareInfo);

    IntlRtFareInfo searchRtFareByFareId(String username, String password, long fareId);

    OpenApiResponse adjustRtFareProfit(String username, String password, long fareId, int profit);

    /**
     * 查找国际公布运价
     * @param username
     * @param password
     * @param fareInfo
     * @return
     */
    PublishFareResponse searchIntlPubFareInfo(String username, String password, IntlPublishFareInfo fareInfo);

    /**
     * 新增单程政策
     * @param username
     * @param password
     * @param owFareInfo
     * @return
     */
    OpenApiResponse createIntlOwFareInfo(String username, String password, IntlOwFareInfo owFareInfo);
    OpenApiResponse createIntlOwFareInfo(String username, String password, List<IntlOwFareInfo> owFareInfos);

    OpenApiResponse createIntlRtFareInfo(String username, String password, IntlRtFareInfo rtFareInfo);
    OpenApiResponse createIntlRtFareInfo(String username, String password, List<IntlRtFareInfo> rtFareInfos);

    OpenApiResponse createIntlPubFareInfo(String username, String password, IntlPublishFareInfo fareInfo);



}
